﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using OAPlatform.DomainModel.Model;
using OAPlatform.DomainModel.Model.Schedule;

namespace OAPlatform.EFAccess
{
    public class OAContext : DbContext
    {
        public DbSet<User> Users { get; set; }
        public DbSet<Band> Bands { get; set; }
        public DbSet<Department> Departments { get; set; }
        public DbSet<Permission> Permissions { get; set; }

        //public DbSet<WorkLog> WorkLogs { }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            Database.SetInitializer(new DropCreateDatabaseIfModelChanges<OAContext>());
            base.OnModelCreating(modelBuilder);
        }
    }
}
